package com.ztman.router.main;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.ztman.router.common.base.BaseActivity;
import com.ztman.router.main.dagger.constract.AboutContract;
import com.ztman.router.main.dagger.presenter.AboutPresenter;

import me.yokeyword.fragmentation.anim.FragmentAnimator;

/**
 * @Title:WechatActivity
 * @Package:com.ztman.router.main
 * @Description:仿微信首页UI
 * @Auther:YJH
 * @Email:yuannunhua@gmail.com
 * @Date:2018/5/1712:25
 */
@Route(path = "/main/WechatActivity")
public class WechatActivity extends BaseActivity<AboutPresenter> implements AboutContract.View {


    @Override
    protected int setLayoutId() {
        return R.layout.activity_wechat;
    }

    @Override
    protected void initEventAll() {
        if (findFragment(MainFragment.class) == null) {
            loadRootFragment(R.id.frag_container, MainFragment.newInstance());
        }
    }

    @Override
    public void showDetail() {

    }

    @Override
    protected void initInject() {
        getActivityComponent().inject(this);
    }


    @Override
    public void onBackPressedSupport() {
        // 对于 4个类别的主Fragment内的回退back逻辑,已经在其onBackPressedSupport里各自处理了
        super.onBackPressedSupport();
    }

    @Override
    public FragmentAnimator onCreateFragmentAnimator() {
        // 设置横向(和安卓4.x动画相同)
        return super.onCreateFragmentAnimator();
    }
}
